<{if $is_mobile}>

  <{include file="db:`$mydirname`_mobile_block_links.html"}>

<{else}>

<{if $tablelist==1}>

  <{* TABLE *}>
  <div style="width:100%;">
  <{foreach item=link from=$links key=count name=i }>
    <div style="float:left;text-align:center;padding:0 0 6px 0;width:<{if ($count+1) is div by $colsnum}><{$colwidth-1}><{else}><{$colwidth}><{/if}>%;">
      <a href="<{my_make_uri option=$uri_options mydirname=$mydirname method=item p_key1=lid p_val1=$link.lid}>" title="<{$link.title}>">
        <{* TABLE-SCREENSHOT *}>
        <{if $b_screen_shot==1}>
          <{if $link.adult}>
            <img src="<{$myurl}>/images/warning128.gif" width="128" height="128" />
          <{elseif ! $link.url}>
            <img src="<{$myurl}>/images/mobileonly128.gif" width="128" height="128" />
          <{else}>
            <{if $link.capture}>
              <img src="<{$cache_url}>/<{$link.lid}>.jpg" width="128" height="128" />
            <{else}>
              <{if $screenshotservice}>
                <img src="<{$screenshotservice}><{$link.url}>" width="128" height="128" />
              <{else}>
                <img src="<{$myurl}>/images/cancel128.gif" width="128" height="128" />
              <{/if}>
            <{/if}>
          <{/if}>
          <br />
        <{/if}>
        <{$link.title|links_substr:0:$length}>
        <br />(<{$link.date|formatTimestamp:"m"}>)
      </a> 
    </div>
    <{if ($count+1) is div by $colsnum || $smarty.foreach.i.last}>
      <br style="clear:both;">
    <{/if}>
  <{/foreach}>
  </div>

<{else}>

  <{if $b_screen_shot == 1}>

    <{* LIST-SCREENSHOT *}>
    <{foreach item=link from=$links}>
      <a href="<{my_make_uri option=$uri_options mydirname=$mydirname method=item p_key1=lid p_val1=$link.lid}>" title="<{$link.title}>">
        <{if $link.adult}>
          <img src="<{$myurl}>/images/warning64.gif" width="64" height="64" style="vertical-align:middle;" />
        <{elseif ! $link.url}>
          <img src="<{$myurl}>/images/mobileonly64.gif" width="64" height="64" style="vertical-align:middle;" />
        <{else}>
          <{if $link.capture}>
            <img src="<{$cache_url}>/<{$link.lid}>.jpg" width="64" height="64" style="vertical-align:middle;" />
          <{else}>
            <{if $screenshotservice}>
              <img src="<{$screenshotservice}><{$link.url}>" width="64" height="64" style="vertical-align:middle;" />
            <{else}>
              <img src="<{$myurl}>/images/cancel64.gif" width="64" height="64" style="vertical-align:middle;" />
            <{/if}>
          <{/if}>
        <{/if}>
        <{$link.title|links_substr:0:$length}>
      </a> 
      (<{$link.date|formatTimestamp:"m"}>)<br />
    <{/foreach}>

  <{else}>

    <{* LIST-TITLE ONLY *}>
    <{if $order==1 || $order==2 || $order==3}><ol><{else}><ul><{/if}>
      <{foreach item=link from=$links}>
        <li>
          <a href="<{my_make_uri option=$uri_options mydirname=$mydirname method=item p_key1=lid p_val1=$link.lid}>" title="<{$link.title}>">
            <{$link.title|links_substr:0:$length}>
          </a>
          <{if $order==1}>[<{$link.access}>]<{elseif $order==2}>[<{$link.hits}>]<{elseif $order==3}>[<{$link.rating}>]<{/if}>
          (<{$link.date|formatTimestamp:"m"}>)
        </li>
      <{/foreach}>
    <{if $order==1 || $order==2 || $order==3}></ol><{else}></ul><{/if}>

  <{/if}>

<{/if}>

<{/if}><{*<!-- END of is_mobile -->*}>